1. Field of the Invention
The present invention relates to computer systems. More specifically, the present invention relates to a method and an apparatus for in-cache reference counting to facilitate garbage-collection in computer systems.
2. Related Art
Computer users are increasingly demanding the ability to scale computer applications so that they can use very large heaps while maintaining performance. In particular, users are increasingly requiring low garbage-collection overhead and low pause times for systems that access heaps. In many instances, object caches and garbage-collection mechanisms may improve things significantly. Existing in-cache garbage-collection mechanisms are typically based on mark-sweep techniques, and typically perform several passes with recursion over the contents of the caches. The performance of this type of scheme is very dependent on the structure of the object graph. Consequently, even though throughput may be improved, there may still be significant pauses for particular processors during such garbage-collection operations.
Hence, what is needed is a method and an apparatus for performing in-cache garbage-collection without the problems described above.